﻿Public Class ResultsItem
    Private title As String
    Private myURL As String
    Private fgoogle As Boolean
    Private fbing As Boolean
    Private fyahoo As Boolean
    Private score As Integer
    Public desc As String
    Private flagfoundagain As Boolean
    Public gscore As Integer
    Public bscore As Integer
    Public yscore As Integer

    Public Sub setInfo(ByVal titl As String, ByVal myur As String, ByVal sourc As String, ByVal scor As Integer, ByVal descr As String)
        title = titl
        myURL = myur
        score = scor
        desc = descr

        If sourc = "google" Then
            fgoogle = True
            fbing = False
            fyahoo = False
            gscore = scor
            yscore = 0
            bscore = 0
        ElseIf sourc = "bing" Then
            fgoogle = False
            fbing = True
            fyahoo = False
            gscore = 0
            yscore = 0
            bscore = scor
        Else
            fgoogle = False
            fbing = False
            fyahoo = True
            gscore = 0
            bscore = 0
            yscore = scor
        End If
    End Sub

    Public Sub setScore(ByVal scor As Integer)
        score = scor
    End Sub

    Public Sub setFlag(ByVal flag As Boolean)
        flagfoundagain = flag
    End Sub

    Public Function getTitle() As String
        Return title
    End Function

    Public Function getURL() As String
        Return myURL
    End Function

    Public Function geiIsGoogle() As Boolean
        Return fgoogle
    End Function

    Public Function getIsBing() As Boolean
        Return fbing
    End Function

    Public Function getIsYahoo() As Boolean
        Return fyahoo
    End Function

    Public Function getScore() As Integer
        Return score
    End Function

    Public Function getFlag() As Boolean
        Return flagfoundagain
    End Function

    Public Sub setIsBing()
        fbing = True
    End Sub

    Public Sub setIsYahoo()
        fyahoo = True
    End Sub

    Public Sub setisGoogle()
        fgoogle = True
    End Sub
End Class